// JavaScript Document

//****************************************************************************************//
//*					FLASH						 *//
//****************************************************************************************//

function iFlash( asrc, aw, ah ){
        document.write( "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"" );
        document.write( "       width=\""+aw+"\"" );
        document.write( "       height=\""+ah+"\">" );
        document.write( "       <param name=\"movie\" value=\""+asrc+"\">" );
        document.write( "       <param name=\"quality\" value=\"high\">" );
        document.write( "       <embed  src=\""+asrc+"\"" );
        document.write( "               quality=\"high\"" );
        document.write( "               type=\"application/x-shockwave-flash\"" );
        document.write( "               width=\""+aw+"\"" );
        document.write( "               height=\""+ah+"\">" );
        document.write( "       </embed></object>");
}

//****************************************************************************************//
//*					END						 *//
//****************************************************************************************//

function desplegar(categoria){

var menu = document.getElementById(categoria);

    if(menu.className == "ver_menu"){

      menu.className = "ocultar_menu";

    }

    else{

      menu.className = "ver_menu";

    }

}

function getElementPosition(elemID){
var offsetTrail = document.getElementById(elemID);
var offsetLeft = 0;
var offsetTop = 0;
while (offsetTrail){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
offsetLeft += document.body.leftMargin;
offsetTop += document.body.topMargin;
}
return {left:offsetLeft,top:offsetTop};
}


function sube_pie(){
	var trepa = 0;
	var alt = altura_ventana();
	while (getElementPosition('ancla2').top <alt){
		document.getElementById("ancla3").style.height = trepa+"px";
		trepa++;
	}
}

function altura_ventana(){
	if (window.innerHeight){
		//navegadores basados en mozilla
		espacio_pagina = window.innerHeight
	}else{
		//Navegadores basados en IExplorer, es que no tengo innerheight
		espacio_pagina = document.body.clientHeight
	}
	return espacio_pagina;
}

function XBw(ly){
	var nw = document.getElementById ? document.getElementById(ly):document.layers? document.layers[ly]: document.all? document.all[ly]:null;
	return nw;
} 